package com.javasix;

public class Test4 {
    public static void main(String[] args) {
        Kanb kanb = new Kanb();
        kanb.start();
        kanb.setPriority(Thread.MAX_PRIORITY);
        for (int i = 0; i < 20; i++) {
            try {
                Thread.sleep(500);
                if(i==10){
                    kanb.join();
                }
            }catch (Exception e){
                e.printStackTrace();
            }
            System.out.println("普通号："+(i+1)+"号正在看病");
        }
    }
}
